package com.zq.spring.event;

import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: zhaoqi
 * @Date: 2020/4/24 10:27
 * @Version 1.0
 */

@Configuration
public class DemoListener implements ApplicationListener<DemoEvent> {
    @Override
    public void onApplicationEvent(DemoEvent event) {
        String msg = event.getMsg();
        System.out.println("我接受到发布的消息了 " + msg);
    }
}
